package com.yicong.ants.manager.business;

import com.cchao.simplelib.core.RxHelper;
import com.yicong.ants.manager.http.RetrofitHelper;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.disposables.Disposable;

/**
 * 事件埋点 管理
 *
 * @author cchao
 * @version 2019-08-09.
 */
public class ActionTracker {

    public static void download(String appId) {
        // 统计
        Map<String, String> params = new HashMap<>(4);
        params.put("app_id", appId);
        Disposable disposable = RetrofitHelper.getApis().downloadTracker(params)
            .compose(RxHelper.toMain())
            .subscribe(respBean -> {
            }, RxHelper.getErrorConsumer());
    }
}
